import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import axios from "axios";
import './plugins/wyz-echarts/wyz-echarts.js'
import 'element-ui/lib/theme-chalk/index.css';
import echarts from "echarts"

Vue.config.productionTip = false
axios.defaults.baseURL="http://localhost:8200/orderSystem"
Vue.prototype.$http=axios
Vue.prototype.$echarts=echarts
Vue.prototype.$fileUploadUrl='http://localhost:8122/orderSystem/common/uploadFile'
new Vue({
  router,
  store,
  render: h => h(App),
  beforeCreate() {
    Vue.prototype.$bus = this;
    Vue.prototype.$checkRolePower=(rid)=>{

       let powerList= this.$store.state.powerList;
       let flag=false
       powerList.forEach((ridItem)=>{
            if (ridItem===rid){
                flag=true
                return
            }

       });
       return flag;
    }
  }
}).$mount('#app')
